home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / try_qb / terminal.bas (.txt) < prev    next >
QuickBASIC Tokenized Source  |  1989-12-04  |  2KB  |  35 lines

  1. Filter
  2. InString
  3. KeyInput
  4. ModemInput
  5.     BackSpace
  6. LineFeed
  7.  Set screen color.
  8.  Value returned by INKEY$
  9.  when ALT+q is pressed.t
  10.  Set up prompt on bottom line of screen and turn cursor on:
  11. Press ALT+q to quit"
  12.  Print between lines 1 & 23.
  13.  Open communications (1200 baud, no parity, 8-bit data, 
  14.  1 stop bit, 256-byte input buffer):
  15. COM1:1200,N,8,1"d
  16.  Main communications loop.
  17.  Check the keyboard.
  18.  Exit the loop if the user
  19.  pressed ALT+q. 
  20.  Otherwise, if the user has
  21.  pressed a key, send the
  22.  character typed to the modem.
  23.  Check the modem. If characters are waiting (EOF(1) is
  24.  true), get them and print them to the screen:
  25.  LOC(1) gives the number of characters waiting:
  26.  Filter out line feeds and
  27.  backspaces, then print.
  28.  End communications.
  29. Filter
  30. = FILTER 
  31.  Filters characters in an input string.i
  32.  Look for backspace characters and recode them to=
  33.  CHR$(29) (the LEFT cursor key):
  34.  Look for line-feed characters and remove any found:
  35.